<template>
  <div class="sidebar">
    <el-menu
      class="sidebar-el-menu"
      :default-active="onRoutes"
      :collapse="collapse"
      background-color="#104E8B"
      text-color="#fff"
      active-text-color="#fff"
      router
    >
      <template v-for="item in this.name === 'admin' ? items1 : items2">
        <template v-if="item.subs">
          <el-submenu :index="item.index" :key="item.index">
            <template slot="title">
              <i :class="item.icon"></i>
              <span slot="title">{{ item.title }}</span>
            </template>
            <template v-for="subItem in item.subs">
              <el-submenu
                v-if="subItem.subs"
                :index="subItem.index"
                :key="subItem.index"
              >
                <template slot="title">{{ subItem.title }}</template>
                <el-menu-item
                  v-for="(threeItem, i) in subItem.subs"
                  :key="i"
                  :index="threeItem.index"
                  >{{ threeItem.title }}</el-menu-item
                >
              </el-submenu>
              <el-menu-item
                v-else
                :index="subItem.index"
                :key="subItem.index"
                >{{ subItem.title }}</el-menu-item
              >
            </template>
          </el-submenu>
        </template>
        <template v-else>
          <el-menu-item :index="item.index" :key="item.index">
            <i :class="item.icon"></i>
            <span slot="title">{{ item.title }}</span>
          </el-menu-item>
        </template>
      </template>
    </el-menu>
  </div>
</template>

<script>
import bus from '../common/bus';
export default {
  data () {
    return {
      collapse: false,
      name: "admin",
      items1: [

        {
          "functionID": "01609",
          "icon": "el-icon-s-opportunity",
          "index": "RegisterSign",
          "title": "基本信息",
          "subs": [

          {
              "functionID": "0160301",
              "icon": "el-icon-s-shop",
              "index": "PlacePointHome",
              "title": "餐饮单位",
              "subs": null
            },
            {
              "functionID": "0160902",
              "icon": "el-icon-s-home",
              "index": "PlaceCompanyHome",
              "title": "收运单位",
              "subs": null
            },
            {
              "functionID": "0160303",
              "icon": "",
              "index": "PlaceStationHome",
              "title": "中转站",
              "subs": null
            },
            {
              "functionID": "0160304",
              "icon": "",
              "index": "PlacePreFactoryHome",
              "title": "预处理厂",
              "subs": null
            },
            {
              "functionID": "0160305",
              "icon": "",
              "index": "PlaceFactoryHome",
              "title": "深加工厂",//"处理厂",
              "subs": null
            },
            {
              "functionID": "0160306",
              "icon": "",
              "index": "PlaceInOutHome",
              "title": "进出口单位",
              "subs": null
            },
            {
              "functionID": "01604",
              "icon": "el-icon-truck",
              "index": "CarServe",
              "title": "车辆",
              "subs": [
                {
                  "functionID": "0160401",
                  "icon": "",
                  "index": "CarServeHome",
                  "title": "车辆基础信息",
                  "subs": null
                },
                {
                  "functionID": "0160402",
                  "icon": "",
                  "index": "DriverInformation",
                  "title": "司机信息",
                  "subs": null
                },
              ]
            },
            {
              "functionID": "01606",
              "icon": "el-icon-s-custom",
              "index": "Work",
              "title": "人员",
              "subs": [
                {
                  "functionID": "0160602",
                  "icon": "",
                  "index": "ExcelWork",
                  "title": "收运单位收运管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160603",
                  "icon": "",
                  "index": "ExcelWorkC",
                  "title": "餐饮服务单位管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160604",
                  "icon": "",
                  "index": "ExcelWorkZ",
                  "title": "中转站管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160605",
                  "icon": "",
                  "index": "ExcelWorkY",
                  "title": "预处理厂管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160606",
                  "icon": "",
                  "index": "ExcelWorkS",
                  "title": "深加工处理厂管理人员",
                  "subs": null
                }, {
                  "functionID": "0160608",
                  "icon": "",
                  "index": "ExcelWorkInOut",
                  "title": "出口单位管理人员",
                  "subs": null
                }, {
                  "functionID": "0160607",
                  "icon": "",
                  "index": "ExcelWorkQ",
                  "title": "政府管理人员",
                  "subs": null
                },
              ]
            }
            // {
            //   "functionID": "0160902",
            //   "icon": "",
            //   "index": "zzzAlert",
            //   "title": "中转站报警信息",
            //   "subs": null
            // }
          ]
        },
        {
          "functionID": "0160901",
          "icon": "el-icon-location",
          "index": "RegisterSign",
          "title": "合同管理",
          "subs": null
        },

        {
          "functionID": "01611",
          "icon": "el-icon-s-custom",
          "index": "Collection",
          "title": "接单管理",
          "subs": [
            {
              "functionID": "0161101",
              "icon": "",
              "index": "AppointmentSign",
              "title": "餐饮单位申请",
              "subs": null
            },
            {
              "functionID": "0161102",
              "icon": "",
              "index": "DispatchInformation",
              "title": "预约收运",
              "subs": null
            },
            {
              "functionID": "0161103",
              "icon": "",
              "index": "CollectionSign",
              "title": "定期收运",
              "subs": null
            }
          ]
        },
        {
          "functionID": "01612",
          "icon": "el-icon-s-custom",
          "index": "Delegate",
          "title": "派单管理",
          "subs": [
            {
              "functionID": "0161202",
              "icon": "",
              "index": "DelegateSign",
              "title": "已派单信息",
              "subs": null
            },
            {
              "functionID": "0160203",
              "icon": "",
              "index": "VehicleAlert",
              "title": "报警信息",
              "subs": null
            }
          ]
        },
        {
          "functionID": "",
          "icon": "el-icon-s-claim",
          "index": "CollectionManage",
          "title": "收运管理",
          "subs": null
        },
        {
          "functionID": "01608",
          "icon": "el-icon-s-claim",
          "index": "WeightStatisticsRealTime",
          "title": "称重管理",
          "subs": null
        },
        {
          "functionID": "01607",
          "icon": "el-icon-video-camera-solid",
          "index": "HuabaoCCTV",
          "title": "影像管理",
          "subs": null
        },
        {
          "functionID": "01601",
          "icon": "el-icon-location",
          "index": "RubbishHome",
          "title": "导航管理",
          "subs": [{
            "functionID": "01601",
            "icon": "el-icon-location",
            "index": "RubbishHome",
            "title": "实时监控",
            "subs": null
          },
          {
            "functionID": "01602",
            "icon": "el-icon-location",
            "index": "RubbishAlert",
            "title": "车辆报警",
            "subs": null
          },]
        },

        {
          "functionID": "01604",
          "icon": "el-icon-s-data",
          "index": "WeightStatistics",
          "title": "统计分析",
          "subs": [
            {
              "functionID": "0160401",
              "icon": "",
              "index": "WeightStatisticsSign",
              "title": "按合同统计",
              "subs": null
            },
            {
              "functionID": "0160402",
              "icon": "",
              "index": "WeightStatisticsOilType",
              "title": "按排放油品统计",
              "subs": null
            },
            {
              "functionID": "0160403",
              "icon": "",
              "index": "WeightStatisticsExport",
              "title": "按餐饮单位统计",
              "subs": null
            },
            {
              "functionID": "0160404",
              "icon": "",
              "index": "WeightStatisticsZZZ",
              "title": "按中转站统计",
              "subs": null
            },
            {
              "functionID": "0160405",
              "icon": "",
              "index": "WeightStatisticsPre",
              "title": "按预处理厂统计",
              "subs": null
            },
            {
              "functionID": "0160406",
              "icon": "",
              "index": "WeightStatisticsCLC",
              "title": "按处理厂统计",
              "subs": null
            },
            // {
            //   "functionID": "0160407",
            //   "icon": "",
            //   "index": "WeightStatisticsExport",
            //   "title": "按餐饮单位统计",
            //   "subs": null
            // },
            {
              "functionID": "0160408",
              "icon": "",
              "index": "WeightStatisticsCity",
              "title": "按全区统计",
              "subs": null
            },
            {
              "functionID": "0160409",
              "icon": "",
              "index": "WeightStatisticsArea",
              "title": "按街镇统计",
              "subs": null
            },
          ]
        },
        {
          "functionID": "01610",
          "icon": "el-icon-s-data",
          "index": "AccountManage",
          "title": "权限管理",
          "subs": [
            {
              "functionID": "0161001",
              "icon": "",
              "index": "AccountManage",
              "title": "账户管理",
              "subs": null
            },
            {
              "functionID": "0161002",
              "icon": "",
              "index": "RoleManage",
              "title": "角色管理",
              "subs": null
            },
          ]
        }
      ],
      items01: [
        {
          "functionID": "01601",
          "icon": "el-icon-location",
          "index": "RubbishHome",
          "title": "导航管理",
          "subs": null
        },
        {
          "functionID": "01602",
          "icon": "el-icon-location",
          "index": "RubbishAlert",
          "title": "车辆报警",
          "subs": null
        },
        {
          "functionID": "01609",
          "icon": "el-icon-s-opportunity",
          "index": "RegisterSign",
          "title": "基本信息",
          "subs": [
            {
              "functionID": "0160901",
              "icon": "",
              "index": "RegisterSign",
              "title": "合同管理",
              "subs": null
            },
            {
              "functionID": "0160902",
              "icon": "el-icon-s-home",
              "index": "PlaceCompanyHome",
              "title": "收运单位管理",
              "subs": null
            },
            {
              "functionID": "01603",
              "icon": "el-icon-s-tools",
              "index": "Place",
              "title": "设施管理",
              "subs": [
                {
                  "functionID": "0160301",
                  "icon": "el-icon-s-shop",
                  "index": "PlacePointHome",
                  "title": "餐饮单位管理",
                  "subs": null
                },
                {
                  "functionID": "0160303",
                  "icon": "",
                  "index": "PlaceStationHome",
                  "title": "中转站管理",
                  "subs": null
                },
                {
                  "functionID": "0160304",
                  "icon": "",
                  "index": "PlacePreFactoryHome",
                  "title": "预处理厂管理",
                  "subs": null
                },
                {
                  "functionID": "0160305",
                  "icon": "",
                  "index": "PlaceFactoryHome",
                  "title": "处理厂管理",
                  "subs": null
                },
                // {
                //   "functionID": "0160303",
                //   "icon": "",
                //   "index": "VideoSurveillance",
                //   "title": "中转站视频监控",
                //   "subs": null
                // }
              ]
            },
            {
              "functionID": "01604",
              "icon": "el-icon-truck",
              "index": "CarServe",
              "title": "车辆管理",
              "subs": [
                {
                  "functionID": "0160401",
                  "icon": "",
                  "index": "CarServeHome",
                  "title": "车辆基础信息管理",
                  "subs": null
                },
                {
                  "functionID": "0160402",
                  "icon": "",
                  "index": "DriverInformation",
                  "title": "司机信息管理",
                  "subs": null
                },
              ]
            },
            {
              "functionID": "01606",
              "icon": "el-icon-s-custom",
              "index": "Work",
              "title": "人员管理",
              "subs": [
                {
                  "functionID": "0160602",
                  "icon": "",
                  "index": "ExcelWork",
                  "title": "收运单位收运管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160603",
                  "icon": "",
                  "index": "ExcelWorkC",
                  "title": "餐饮服务单位管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160604",
                  "icon": "",
                  "index": "ExcelWorkZ",
                  "title": "中转站管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160605",
                  "icon": "",
                  "index": "ExcelWorkY",
                  "title": "预处理厂管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160606",
                  "icon": "",
                  "index": "ExcelWorkS",
                  "title": "深加工处理厂管理人员",
                  "subs": null
                }, {
                  "functionID": "0160607",
                  "icon": "",
                  "index": "ExcelWorkQ",
                  "title": "政府管理人员",
                  "subs": null
                },
              ]
            }
            // {
            //   "functionID": "0160902",
            //   "icon": "",
            //   "index": "zzzAlert",
            //   "title": "中转站报警信息",
            //   "subs": null
            // }
          ]
        },
        {
          "functionID": "01611",
          "icon": "el-icon-s-custom",
          "index": "Collection",
          "title": "接单管理",
          "subs": [
            {
              "functionID": "0161101",
              "icon": "",
              "index": "AppointmentSign",
              "title": "餐饮单位申请",
              "subs": null
            },
            {
              "functionID": "0161102",
              "icon": "",
              "index": "DispatchInformation",
              "title": "预约收运",
              "subs": null
            },
            {
              "functionID": "0161103",
              "icon": "",
              "index": "CollectionSign",
              "title": "定期收运",
              "subs": null
            }
          ]
        },
        {
          "functionID": "01612",
          "icon": "el-icon-s-custom",
          "index": "Delegate",
          "title": "派单管理",
          "subs": [
            {
              "functionID": "0161202",
              "icon": "",
              "index": "DelegateSign",
              "title": "已派单信息",
              "subs": null
            },
            {
              "functionID": "0160203",
              "icon": "",
              "index": "VehicleAlert",
              "title": "报警信息",
              "subs": null
            }
          ]
        },

        {
          "functionID": "01608",
          "icon": "el-icon-s-claim",
          "index": "WeightStatisticsRealTime",
          "title": "称重管理",
          "subs": null
        },
        {
          "functionID": "01607",
          "icon": "el-icon-video-camera-solid",
          "index": "HuabaoCCTV",
          "title": "影像管理",
          "subs": null
        },
        // {
        //   "functionID": "01603",
        //   "icon": "el-icon-s-opportunity",
        //   "index": "Alert",
        //   "title": "报警管理",
        //   "subs": [
        //     {
        //       "functionID": "0160201",
        //       "icon": "",
        //       "index": "RubbishAlert",
        //       "title": "车辆报警信息",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160202",
        //       "icon": "",
        //       "index": "zzzAlert",
        //       "title": "中转站报警信息",
        //       "subs": null
        //     }
        //   ]
        // },
        // {
        //   "functionID": "01605",
        //   "icon": "el-icon-picture",
        //   "index": "ExcelPhoto",
        //   "title": "异地转移备案管理",
        //   "subs": null
        // },
        // {
        //   "functionID": "01604",
        //   "icon": "el-icon-s-data",
        //   "index": "WeightStatistics",
        //   "title": "统计分析",
        //   "subs": [
        //     {
        //       "functionID": "0160401",
        //       "icon": "",
        //       "index": "WeightStatisticsCar",
        //       "title": "按车辆统计",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160402",
        //       "icon": "",
        //       "index": "WeightStatisticsPointRubbish",
        //       "title": "按餐饮单位统计",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160403",
        //       "icon": "",
        //       "index": "WeightStatisticsArea",
        //       "title": "按街镇统计",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160404",
        //       "icon": "",
        //       "index": "WeightStatisticsCity",
        //       "title": "按全区统计",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160405",
        //       "icon": "",
        //       "index": "WeightStatisticsZZZ",
        //       "title": "按中转站统计",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160406",
        //       "icon": "",
        //       "index": "WeightStatisticsPre",
        //       "title": "按预处理厂统计",
        //       "subs": null
        //     },
        //     {
        //       "functionID": "0160407",
        //       "icon": "",
        //       "index": "WeightStatisticsCLC",
        //       "title": "按处理厂统计",
        //       "subs": null
        //     }
        //   ]
        // },
        {
          "functionID": "01604",
          "icon": "el-icon-s-data",
          "index": "WeightStatistics",
          "title": "统计分析",
          "subs": [
            {
              "functionID": "0160401",
              "icon": "",
              "index": "WeightStatisticsSign",
              "title": "按合同统计",
              "subs": null
            },
            {
              "functionID": "0160402",
              "icon": "",
              "index": "WeightStatisticsOilType",
              "title": "按排放油品统计",
              "subs": null
            },
            {
              "functionID": "0160403",
              "icon": "",
              "index": "WeightStatisticsPointRubbish",
              "title": "按餐饮单位统计",
              "subs": null
            },
            {
              "functionID": "0160404",
              "icon": "",
              "index": "WeightStatisticsZZZ",
              "title": "按中转站统计",
              "subs": null
            },
            {
              "functionID": "0160405",
              "icon": "",
              "index": "WeightStatisticsPre",
              "title": "按预处理厂统计",
              "subs": null
            },
            {
              "functionID": "0160406",
              "icon": "",
              "index": "WeightStatisticsCLC",
              "title": "按处理厂统计",
              "subs": null
            },
            {
              "functionID": "0160407",
              "icon": "",
              "index": "WeightStatisticsExport",
              "title": "按餐饮单位统计",
              "subs": null
            },
            {
              "functionID": "0160408",
              "icon": "",
              "index": "WeightStatisticsCity",
              "title": "按全区统计",
              "subs": null
            },
            {
              "functionID": "0160409",
              "icon": "",
              "index": "WeightStatisticsArea",
              "title": "按街镇统计",
              "subs": null
            },
          ]
        },
        {
          "functionID": "01610",
          "icon": "el-icon-s-data",
          "index": "AccountManage",
          "title": "权限管理",
          "subs": [
            {
              "functionID": "0161001",
              "icon": "",
              "index": "AccountManage",
              "title": "账户管理",
              "subs": null
            },
            {
              "functionID": "0161002",
              "icon": "",
              "index": "RoleManage",
              "title": "角色管理",
              "subs": null
            },
          ]
        }
      ],
      items2: [

        {
          "functionID": "01609",
          "icon": "el-icon-s-opportunity",
          "index": "RegisterSign",
          "title": "基本信息",
          "subs": [

            {
              "functionID": "0160902",
              "icon": "el-icon-s-home",
              "index": "PlaceCompanyHome",
              "title": "收运单位管理",
              "subs": null
            },
            {
              "functionID": "0160301",
              "icon": "el-icon-s-shop",
              "index": "PlacePointHome",
              "title": "餐饮单位管理",
              "subs": null
            },
            {
              "functionID": "0160303",
              "icon": "",
              "index": "PlaceStationHome",
              "title": "中转站管理",
              "subs": null
            },
            {
              "functionID": "0160304",
              "icon": "",
              "index": "PlacePreFactoryHome",
              "title": "预处理厂管理",
              "subs": null
            },
            {
              "functionID": "0160305",
              "icon": "",
              "index": "PlaceFactoryHome",
              "title": "出口单位管理",//"处理厂管理",
              "subs": null
            },
            {
              "functionID": "01604",
              "icon": "el-icon-truck",
              "index": "CarServe",
              "title": "车辆管理",
              "subs": [
                {
                  "functionID": "0160401",
                  "icon": "",
                  "index": "CarServeHome",
                  "title": "车辆基础信息管理",
                  "subs": null
                },
                {
                  "functionID": "0160402",
                  "icon": "",
                  "index": "DriverInformation",
                  "title": "司机信息管理",
                  "subs": null
                },
              ]
            },
            {
              "functionID": "01606",
              "icon": "el-icon-s-custom",
              "index": "Work",
              "title": "人员管理",
              "subs": [
                {
                  "functionID": "0160602",
                  "icon": "",
                  "index": "ExcelWork",
                  "title": "收运单位收运管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160603",
                  "icon": "",
                  "index": "ExcelWorkC",
                  "title": "餐饮服务单位管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160604",
                  "icon": "",
                  "index": "ExcelWorkZ",
                  "title": "中转站管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160605",
                  "icon": "",
                  "index": "ExcelWorkY",
                  "title": "预处理厂管理人员",
                  "subs": null
                },
                {
                  "functionID": "0160606",
                  "icon": "",
                  "index": "ExcelWorkS",
                  "title": "深加工处理厂管理人员",
                  "subs": null
                }, {
                  "functionID": "0160607",
                  "icon": "",
                  "index": "ExcelWorkQ",
                  "title": "政府管理人员",
                  "subs": null
                },
              ]
            }
            // {
            //   "functionID": "0160902",
            //   "icon": "",
            //   "index": "zzzAlert",
            //   "title": "中转站报警信息",
            //   "subs": null
            // }
          ]
        },
        {
          "functionID": "01605",
          "icon": "el-icon-picture",
          "index": "ExcelPhoto",
          "title": "异地转移备案管理",
          "subs": null
        },
        {
          "functionID": "01606",
          "icon": "el-icon-picture",
          "index": "ExcelPhotoX",
          "title": "行政许可管理",
          "subs": null
        },
        {
          "functionID": "01604",
          "icon": "el-icon-s-data",
          "index": "WeightStatistics",
          "title": "统计分析",
          "subs": [
            {
              "functionID": "0160401",
              "icon": "",
              "index": "WeightStatisticsSign",
              "title": "按合同统计",
              "subs": null
            },
            {
              "functionID": "0160402",
              "icon": "",
              "index": "WeightStatisticsOilType",
              "title": "按排放油品统计",
              "subs": null
            },
            {
              "functionID": "0160403",
              "icon": "",
              "index": "WeightStatisticsPointRubbish",
              "title": "按餐饮单位统计",
              "subs": null
            },
            {
              "functionID": "0160404",
              "icon": "",
              "index": "WeightStatisticsZZZ",
              "title": "按中转站统计",
              "subs": null
            },
            {
              "functionID": "0160405",
              "icon": "",
              "index": "WeightStatisticsPre",
              "title": "按预处理厂统计",
              "subs": null
            },
            {
              "functionID": "0160406",
              "icon": "",
              "index": "WeightStatisticsCLC",
              "title": "按处理厂统计",
              "subs": null
            },
            {
              "functionID": "0160407",
              "icon": "",
              "index": "WeightStatisticsExport",
              "title": "按餐饮单位统计",
              "subs": null
            },
            {
              "functionID": "0160408",
              "icon": "",
              "index": "WeightStatisticsCity",
              "title": "按全区统计",
              "subs": null
            },
            {
              "functionID": "0160409",
              "icon": "",
              "index": "WeightStatisticsArea",
              "title": "按街镇统计",
              "subs": null
            },
          ]
        },
        {
          "functionID": "01610",
          "icon": "el-icon-s-data",
          "index": "AccountManage",
          "title": "权限管理",
          "subs": [
            {
              "functionID": "0161001",
              "icon": "",
              "index": "AccountManage",
              "title": "账户管理",
              "subs": null
            },
            {
              "functionID": "0161002",
              "icon": "",
              "index": "RoleManage",
              "title": "角色管理",
              "subs": null
            },
          ]
        }
      ],
      items02: [{
        "functionID": "0160301",
        "icon": "el-icon-s-shop",
        "index": "PlacePointHome",
        "title": "基本信息",
        "subs": [
          {
            "functionID": "0160301",
            "icon": "el-icon-s-shop",
            "index": "PlacePointHome",
            "title": "餐饮单位",
            "subs": null
          },
          {
            "functionID": "0160302",
            "icon": "el-icon-s-home",
            "index": "PlaceCompanyHome",
            "title": "收运单位",
            "subs": null
          },
          {
            "functionID": "0160306",
            "icon": "el-icon-s-home",
            "index": "PlaceImportHome",
            "title": "出口中间商",
            "subs": [{
              "functionID": "016030601",
              "icon": "",
              "index": "PlaceImportHome",
              "title": "出口中间商",
              "subs": null
            }, {
              "functionID": "016030602",
              "icon": "el-icon-picture",
              "index": "ExcelPhotoJ",
              "title": "进出口备案",
              "subs": null
            }, {
              "functionID": "016030603",
              "icon": "el-icon-picture",
              "index": "ExcelPhotoI",
              "title": "ISCC认证",
              "subs": null
            }]
          },
          {
            "functionID": "01603",
            "icon": "el-icon-s-tools",
            "index": "Place",
            "title": "设施管理",
            "subs": [
              {
                "functionID": "0160303",
                "icon": "",
                "index": "PlaceStationHome",
                "title": "中转站管理",
                "subs": null
              },
              {
                "functionID": "0160304",
                "icon": "",
                "index": "PlacePreFactoryHome",
                "title": "预处理厂管理",
                "subs": null
              },
              {
                "functionID": "0160305",
                "icon": "",
                "index": "PlaceFactoryHome",
                "title": "深加工处理厂",
                "subs": null
              },
              // {
              //   "functionID": "0160303",
              //   "icon": "",
              //   "index": "VideoSurveillance",
              //   "title": "中转站视频监控",
              //   "subs": null
              // }
            ]
          },
          {
            "functionID": "01604",
            "icon": "el-icon-truck",
            "index": "CarServe",
            "title": "车辆管理",
            "subs": [
              {
                "functionID": "0160401",
                "icon": "",
                "index": "CarServeHome",
                "title": "车辆基础信息管理",
                "subs": null
              },
              {
                "functionID": "0160402",
                "icon": "",
                "index": "DriverInformation",
                "title": "司机信息管理",
                "subs": null
              },
            ]
          },

          {
            "functionID": "01606",
            "icon": "el-icon-s-custom",
            "index": "Work",
            "title": "人员管理",
            "subs": [{
              "functionID": "0160607",
              "icon": "",
              "index": "ExcelWorkQJ",
              "title": "区级管理人员信息",
              "subs": null
            }, {
              "functionID": "0160607",
              "icon": "",
              "index": "ExcelWorkZJ",
              "title": "各镇街管理人员",
              "subs": null
            },
            ]
          },
        ]
      },
      {
        "functionID": "01604",
        "icon": "el-icon-s-data",
        "index": "WeightStatistics",
        "title": "统计分析",
        "subs": [
          {
            "functionID": "0160401",
            "icon": "",
            "index": "WeightStatisticsSign",
            "title": "按合同统计",
            "subs": null
          },
          {
            "functionID": "0160402",
            "icon": "",
            "index": "WeightStatisticsOilType",
            "title": "按排放油品统计",
            "subs": null
          },
          {
            "functionID": "0160403",
            "icon": "",
            "index": "WeightStatisticsPointRubbish",
            "title": "按餐饮单位统计",
            "subs": null
          },
          {
            "functionID": "0160404",
            "icon": "",
            "index": "WeightStatisticsZZZ",
            "title": "按中转站统计",
            "subs": null
          },
          {
            "functionID": "0160405",
            "icon": "",
            "index": "WeightStatisticsPre",
            "title": "按预处理厂统计",
            "subs": null
          },
          {
            "functionID": "0160406",
            "icon": "",
            "index": "WeightStatisticsCLC",
            "title": "按处理厂统计",
            "subs": null
          },
          {
            "functionID": "0160407",
            "icon": "",
            "index": "WeightStatisticsExport",
            "title": "按餐饮单位统计",
            "subs": null
          },
          {
            "functionID": "0160408",
            "icon": "",
            "index": "WeightStatisticsCity",
            "title": "按全区统计",
            "subs": null
          },
          {
            "functionID": "0160409",
            "icon": "",
            "index": "WeightStatisticsArea",
            "title": "按街镇统计",
            "subs": null
          },
        ]
      },

      {
        "functionID": "01605",
        "icon": "el-icon-picture",
        "index": "ExcelPhoto",
        "title": "异地转移备案管理",
        "subs": null
      },
      {
        "functionID": "01606",
        "icon": "el-icon-picture",
        "index": "ExcelPhotoX",
        "title": "行政许可管理",
        "subs": null
      },
      {
        "functionID": "01610",
        "icon": "el-icon-s-data",
        "index": "AccountManage",
        "title": "权限管理",
        "subs": [
          {
            "functionID": "0161001",
            "icon": "",
            "index": "AccountManage",
            "title": "账户管理",
            "subs": null
          },
          {
            "functionID": "0161002",
            "icon": "",
            "index": "RoleManage",
            "title": "角色管理",
            "subs": null
          },
        ]
      }
      ]
    };
  },
  computed: {
    onRoutes () {
      return this.$route.path.replace('/', '');
    }
  },
  created () {
    this.name = localStorage.getItem('UID')
    // 通过 Event Bus 进行组件间通信，来折叠侧边栏
    bus.$on('collapse', msg => {
      this.collapse = msg;
      bus.$emit('collapse-content', msg);
    });
    // this.getpermissions()
  },
  methods: {
    // 获取菜单列表
    // async getpermissions(){
    //   const params = {
    //     userName: localStorage.getItem('LOGIN_NAME'),
    //     // userName: 'JSCESHI',
    //     menuID: localStorage.getItem('CurrentService'),
    //   }
    //   const { data } = await this.$Http.get('Role/GetFunctionList', { params })
    //   this.items = Object.assign([],data)
    //   return data.filter(item=>{
    //        if(item.subs.length == 0){
    //            item.subs = undefined
    //        }else {
    //            subs.filter(items=>{
    //                if( items.subs.length == 0){
    //                    items.subs = undefined
    //                }
    //            })
    //        }
    //    })
    // },
  }
};
</script>

<style scoped>
.sidebar {
  display: block;
  position: absolute;
  left: 0;
  top: 3.646vw;
  bottom: 0;
  overflow-y: scroll;
}
.sidebar::-webkit-scrollbar {
  width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse) {
  width: 13.021vw;
}
.sidebar > ul {
  height: 100%;
}
/* .el-menu-item {
  font-weight: bold;
} */
.el-menu-item.is-active {
  font-weight: bold;
  /* background-color: #0d3e6f !important; */
  background-color: #123a63 !important;
  /* border-style:solid; */
  /* border-width:0.104vw; */
  /* border-color:rgb(14, 43, 71) ; */
  border-left-style: solid;
  border-width: 0.26vw;
  border-color: rgb(237, 239, 240);
  box-sizing: border-box;
}
</style>
